from django.urls import re_path, path, include
from rest_framework import routers
from . import views, towviews

router = routers.DefaultRouter()
router.register(r"sems", views.AllinpaySemsMsgViewSet, basename="00短信请求")
# router.register(r"verif", views.AllinpaySemsVerifViewSet, basename="01短信验证")

router.register(r"zattr", views.AllinpaySysAttrViewSet, basename="02查询网站属性")
router.register(r"zattrup", views.AllinpaySysAttrSetViewSet, basename="03修改网站属性")
router.register(r"zsecret", views.AllinpaySecretkeyListViewSet, basename="04查询收单信息")
router.register(r"zsecretup", views.AllinpaySecretkeySetViewSet, basename="05修改收单信息")
router.register(r"zsems", views.AllinpaySysSemsViewSet, basename="06查询短信信息")
router.register(r"zsemsup", views.AllinpaySysSemsSetViewSet, basename="07修改短信信息")
router.register(r"zmail", views.AllinpaySysMailViewSet, basename="08查询邮件信息")
router.register(r"zmailup", views.AllinpaySysMailSetViewSet, basename="09修改邮件信息")
router.register(r"zsums", views.AllinpaySysSettlViewSet, basename="10查询结算设置信息")
router.register(r"zsumsup", views.AllinpaySysSettlSetViewSet, basename="11修改结算设置信息")
router.register(r"zalert", views.AllinpayAlertViewSet, basename="12查询语音设置信息")
router.register(r"zalertup", views.AllinpayAlertSetViewSet, basename="13修改语音设置信息")
router.register(r"attrWeChat", views.AllinpayWeChatSetViewSet, basename="14微信接口参数")
router.register(r"attrPulsar", views.AllinpayPulsarSetViewSet, basename="15消息队列参数")
router.register(r"PulsarTopic", views.AllinpayPulsarTopicViews, basename="16消息队列订阅主题")

# router.register(r"zpver", views.MainVersionListViewSet, basename="21场所端最新版本")
router.register(r"zyver", views.HasVersionYunViews, basename="22云端当前版本")
router.register(r"upload", views.UpdateImagesViews, basename="23上传图片")
router.register(r"uprom", views.UpdatePackageViews, basename="24上传系统包")
router.register(r"soft", views.UpdateSoftViews, basename="25上传用户文件")

router.register(r"allTerm", views.GlobalConfAllTermViews, basename="31全局营收科目")
router.register(r"allInters", views.GlobalConfIntegralListViews, basename="32全局积分类型")
# router.register(r"allWorkItem", views.GlobalWorkitemModelViews, basename="33全局工作项模板")

# router.register(
#     r"allTasks", views.DjangoCeleryBeatPeriodictaskViews, basename="34全局计划任务"
# )
router.register(
    r"resLogs", towviews.SystemBackendLogsForUserViewSet, basename="59查询后台操作日志"
)
router.register(r"resTasks", views.CeleryTaskResViewSet, basename="60异步任务结果")


# router.register(r"tupload", views.FileUploadViews, basename="70测试上传截图")
router.register(
    r"listViews", views.AllinpayAuthViewsSerializerViewSet, basename="60查询视图列表"
)
router.register(r"reCache", views.ShowRedisCacheDataViewSet, basename="61查询缓存数据")

# router.register(r"itemCreate", views.TestCreateWorkItemsViewSet, basename="71测试创建工作项事务")

router.register(r"NewToken", views.GamoPlacetokenListViewSet, basename="80创建三方认证账户")
router.register(r"LoginToken", views.GamoPlacetokenLoginViewSet, basename="81登录三方认证账户")
router.register(r"ListToken", views.GamoPlacetokenEditViewSet, basename="82三方认证账户列表")

urlpatterns = [
    path("", include(router.urls)),
]
